<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      table {
        border: 1px solid #000;
        border-collapse: collapse;
      }
      th {
        background: #eee;
      }
      tr,
      th,
      td {
        padding: 8px 10px;
        border: 1px solid #000;
      }
      td > button {
        margin: 0 5px;
      }
    </style>
  </head>

  <body>
    <div id="app"></div>
    <!-- 1.引入依赖 -->
    <script src="../react/react.development.js"></script>
    <script src="../react/react-dom.development.js"></script>
    <script src="../react/babel.min.js"></script>
    <!-- 2.开始开发 -->
    <script type="text/babel">
      class App extends React.Component {
        constructor() {
          super()

          this.state = {}
        }

        render() {
          return (
            <div>
              <table>
                <thead>
                  <tr>
                    <th></th>
                    <th>书籍名称</th>
                    <th>出版日期</th>
                    <th>价格</th>
                    <th>购买数量</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td>1</td>
                    <td>booName</td>
                    <td>出版日期</td>
                    <td>价格</td>
                    <td>
                      <button>+</button>
                      <span>1</span>
                      <button>-</button>
                    </td>
                    <td>操作</td>
                  </tr>
                </tbody>
              </table>
            </div>
          )
        }
      }
      ReactDOM.render(<App />, document.getElementById('app'))
    </script>
  </body>
</html>
